#!/bin/sh
yesterday=`date -d "yesterday" +%Y%m%d`
echo "$yesterday"
/opt/lagou/servers/hive-2.3.7/bin/hive -e "use mydb;LOAD DATA INPATH '/user_clicks/${yesterday:0:8}/clicklog.txt' INTO TABLE user_clicks PARTITION (dt='$yesterday');"